﻿<%@ Page Language="C#" MasterPageFile="~/Admin/admin.master" AutoEventWireup="true"
    CodeFile="StockOut.aspx.cs" Inherits="Admin_StockOut" Title="StockOut List" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="Server">
    Stock Out List</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <data:GridViewSearchPanel ID="GridViewSearchPanel1" runat="server" GridViewControlID="GridView1"
        PersistenceMethod="Session" />
    <br />
    <data:EntityGridView ID="GridView1" runat="server" AutoGenerateColumns="False" OnSelectedIndexChanged="GridView1_SelectedIndexChanged"
        DataSourceID="StockOutDataSource" DataKeyNames="StockOutId" AllowMultiColumnSorting="false"
        DefaultSortColumnName="" DefaultSortDirection="Ascending" ExcelExportFileName="Export_StockOut.xls">
        <Columns>
            <asp:CommandField ShowSelectButton="True" />
            <asp:BoundField DataField="StockOutId" HeaderText="Stock Out Id" SortExpression="[StockOutId]"
                ReadOnly="True" />
            <asp:BoundField DataField="PreparedBy" HeaderText="PreparedBy" SortExpression="[PreparedBy]" />
            <asp:BoundField DataField="Remark" HeaderText="Remark" SortExpression="[Remark]" />
            <asp:BoundField DataField="StockOutDate" DataFormatString="{0:d}" HtmlEncode="False"
                HeaderText="Stock Out Date" SortExpression="[StockOutDate]" />
            <asp:BoundField DataField="TotalAmount" HeaderText="Total Amount" SortExpression="[TotalAmount]">
                <ItemStyle HorizontalAlign="Right" />
            </asp:BoundField>
            <data:BoundRadioButtonField DataField="IsComplete" HeaderText="Is Complete" SortExpression="[IsComplete]" />
        </Columns>
        <EmptyDataTemplate>
            <b>No StockOut Found!</b>
        </EmptyDataTemplate>
    </data:EntityGridView>
    <br />
    <asp:Button runat="server" ID="btnStockOut" OnClientClick="javascript:location.href='StockOutEdit.aspx'; return false;"
        Text="Add New"></asp:Button>
    <data:StockOutDataSource ID="StockOutDataSource" runat="server" SelectMethod="GetPaged"
        EnablePaging="True" EnableSorting="True" EnableDeepLoad="True">
        <DeepLoadProperties Method="IncludeChildren" Recursive="False">
            <Types>
                <data:StockOutProperty Name="WebUser" />
                <%--<data:StockOutProperty Name="StockOutDetailsCollection" />--%>
            </Types>
        </DeepLoadProperties>
        <Parameters>
            <data:CustomParameter Name="WhereClause" Value="" ConvertEmptyStringToNull="false" />
            <data:CustomParameter Name="OrderByClause" Value="" ConvertEmptyStringToNull="false" />
            <asp:ControlParameter Name="PageIndex" ControlID="GridView1" PropertyName="PageIndex"
                Type="Int32" />
            <asp:ControlParameter Name="PageSize" ControlID="GridView1" PropertyName="PageSize"
                Type="Int32" />
            <data:CustomParameter Name="RecordCount" Value="0" Type="Int32" />
        </Parameters>
    </data:StockOutDataSource>
</asp:Content>
